package com.nengchuan.kbms.dfs.entity.dto;

import com.nengchuan.kbms.dfs.annotation.Relation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * t_permission_file（文件权限设置）
 * </p>
 *
 * @author abe
 * @since 2020-04-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "PermissionFileDTO对象", description = "文件权限设置")
public class PermissionFileDTO {

    @ApiModelProperty(value = "文件权限id")
    private Long id;

    @NotNull(message = "业务id")
    @ApiModelProperty(value = "业务id（文件，文件夹）")
    @Relation
    private Long bizId;

    @NotEmpty(message = "业务类型不能为空")
    @Size(max = 10,message = "业务类型长度不能大于10")
    @ApiModelProperty(value = "业务类型（d：文件夹；f：文件）")
    private String bizType;

    @Size(max = 20,message = "业务类型长度不能大于20")
    @ApiModelProperty(value = "权限编码")
    private String permissionCode;

    @ApiModelProperty(value = "权限开始时间戳")
    private Long permissionBeginDate;

    @ApiModelProperty(value = "权限结束时间戳")
    private Long permissionEndDate;

    @NotNull(message = "用户id不能为空")
    @ApiModelProperty(value = "用户id")
    @Relation
    private Long userId;

}
